import {
  axios
} from '@/utils/request'

const api = {
  datalist: '/app/report/sum',
  review: '/topic/comment/list',
  reviewDel: '/topic/comment/del',
  sensitive: '/sensitive/word/list',
  add: '/sensitive/word/add',
  sensitiveDel: '/sensitive/word/del',
  import: '/sensitive/word/import',
  log: '/app/log/list'
}

export default api

export function dataList (parameter) { // 应用汇总报表
  return axios({
    url: api.datalist,
    method: 'get',
    params: parameter
  })
}

export function reviewList (parameter) { // 评论列表
  return axios({
    url: api.review,
    method: 'get',
    params: parameter
  })
}

export function reviewDelete (parameter) { // 评论删除
  return axios({
    url: api.reviewDel,
    method: 'post',
    data: parameter
  })
}

export function sensitiveList (parameter) { // 评论列表
  return axios({
    url: api.sensitive,
    method: 'get',
    params: parameter
  })
}

export function sensitiveAdd (parameter) { // 敏感词删除
  return axios({
    url: api.add,
    method: 'post',
    data: parameter
  })
}

export function sensitiveDelete (parameter) { // 敏感词删除
  return axios({
    url: api.sensitiveDel,
    method: 'post',
    data: parameter
  })
}

export function sensitiveImport (parameter) { // 敏感词导入
  return axios({
    url: api.import,
    method: 'post',
    data: parameter
  })
}

export function logList (parameter) { // 评论列表
  return axios({
    url: api.log,
    method: 'get',
    params: parameter
  })
}
